Unboxing GitHub






Chaitanya Tejaswi


DDst MMMM, 2020

Git vs GitHub

What’s Git?
Git is a distributed, version-control-system (VCS) for tracking changes in source code.
It was created by Linus Torvalds (= creator of Linux) to manage the Linux Kernel source code.

What’s Github?
GitHub allows you to host your content (probably source code) on the internet, allowing you to manage it using Git.

So, Git is the tool that allows you to manage several versions of a software;
GitHub gives you a website where you can post your work online, and manage it using Git.

What’s in it for you?
>> Answer

Git Installation *

GitHub: SignUp

Goto [github.com]

GitHub: Create A New “Repository”

Goto [github.com/login]
Login using your Username & Password.

GitHub: Upload Files (Manual)

You can manually drag & drop files on GitHub.

GitHub: Upload Files (Auto)

You can update your files to/from GitHub, using Git from Shell/CommandPrompt.
The basic steps to do this are:


README files

MarkDown (README.md)

MarkDown: Create Lecture Notes

We will write our content in a README.md file.
Insert all other files, images, … as links within this file.


Let’s learn the syntax using our [README.md] file, and
Compare it to our [Final Webpage].

GitHub Pages *

Original README
Generated Webpage

Practice

Using what we’ve learnt so for, create a Test project.
[Start]

Later On
For reference, [README.md] & [Final Webpage]

Repository: RESET (Soft/Hard)

What are Soft & Hard Resets?

A Soft Reset resets your local copy of the project to a previous version.
A Hard Reset resets your online copy of the project to a previous version (after executing git push).

git reset --soft 0ad5a7a6
git reset --hard 0ad5a7a6

When to use Soft & Hard Resets?

A Soft Reset is useful when you want to build on top of a previous version, starting from the current version. You do not delete any previous versions.
A Hard Reset is useful when you want to delete all modifications beyond a certain version, and want to build on from this version only.

Repository: DELETE

References

[1] “Getting Started with GitHub”
[2] “Git Large File Storage”
[3] “Git & GitHub Crash Course” by Brad Traversy

Cheatsheets